<?php /* Add Note Service Controller */
	require_once('modules/services/actions/add-note/scripts/validate-service.php');
	if (isset($_POST['form-action'])) {
		$validacion = validarNota();
		if (!empty($validacion)) { //fallo validacion
			$service->getAllFrom((int)$glb_uri[2]);
			$arr_notes = $service->getNotes();
			require_once('modules/services/actions/add-note/view/add-note-service.php');
		} else { //si valido correcto
			$add_note = $service->create();
			//$service->sendEmail();
			$arr_notes = $service->getNotes();
			require_once('modules/services/actions/add-note/view/add-note-service.php');
		}
	} else {
		$service->getAllFrom((int)$glb_uri[2]);
		$arr_notes = $service->getNotes();
		require_once('modules/services/actions/add-note/view/add-note-service.php');
	}
?>